from django.contrib.auth.models import User
from django.db import models

# Create your models here.

class mrc_user(models.Model):
    user=models.OneToOneField(User,verbose_name='mrc用户')
    phone=models.CharField(max_length=50,unique=True,default='',verbose_name='手机号码')
    qq_openid=models.CharField(max_length=250,verbose_name='qq openid')
    weixin_openid=models.CharField(max_length=250,verbose_name='weixin openid')
    weibo_openid=models.CharField(max_length=250,verbose_name='weibo openid')


    class Meta:
        verbose_name='mrc用户信息'
        verbose_name_plural=verbose_name


class mrc_humans(models.Model):
    # 单个用户单个ip人物一条记录
    user_id=models.IntegerField(verbose_name='User表的id')
    human_path=models.TextField(verbose_name='ip人物的图片路径',default='')
    is_delete=models.IntegerField(verbose_name='是否删除 0未删除 1删除',default=0)
    create_time=models.DateTimeField(auto_now_add=True)


    class Meta:
        verbose_name='mrc用户上传ip人物图片的记录'
        verbose_name_plural=verbose_name


class mrc_backgrounds(models.Model):
    user_id = models.IntegerField(verbose_name='User表的id')
    background_path = models.TextField(verbose_name='人物背景的图片路径', default='')
    is_delete = models.IntegerField(verbose_name='是否删除 0未删除 1删除', default=0)
    create_time = models.DateTimeField(auto_now_add=True)

    class Meta:
        verbose_name = 'mrc用户上传人物背景图片的记录'
        verbose_name_plural = verbose_name


# class mrc_run_historys(models.Model):
#     user_id = models.IntegerField(verbose_name='User表的id')
#     xml_code=models.TextField(verbose_name='xml工程配置文件',default='')
#     arduino_code=models.TextField(verbose_name='arduino代码',default='')
#     is_show=models.IntegerField(verbose_name='用户自己是否可见',default=1)
#     create_time=models.DateTimeField(auto_now_add=True)
#
#     class Meta:
#         verbose_name='mrc用户每次烧录或运行代码的记录'
#         verbose_name_plural=verbose_name